SYS:Utilities/multiview splashscreen.png

requestfile Title "Where do you wish to install Jack? (A drawer will be created)" drawersonly noicons >ENV:jack_destination

if exists ENV:jack_destination

	copy Distribution/#? "$jack_destination" ALL QUIET

	copy Executables/warpos/jack "$jack_destination" QUIET

	if not exists libs:hollywood
		makedir libs:hollywood
	endif

	; INSTALL HOLLYWOOD PLUG-INS WHERE REQUIRED
	if exists libs:Hollywood
		if exists libs:hollywood/avcodec.hwp
			version >nil: libs:hollywood/avcodec.hwp 1
			if warn
				copy plug-ins/warpos/avcodec.hwp libs:hollywood/ QUIET
			endif
		else
			copy plug-ins/classic/avcodec.hwp libs:hollywood/ QUIET
		endif
		if exists libs:hollywood/svgimage.hwp
			version >nil: libs:hollywood/svgimage.hwp 1
			if warn
				copy plug-ins/warpos/svgimage.hwp libs:hollywood/ QUIET
			endif
		else
			copy plug-ins/warpos/svgimage.hwp libs:hollywood/ QUIET
		endif
		if exists libs:hollywood/vectorgraphics.hwp
			version >nil: libs:hollywood/vectorgraphics.hwp 1
			if warn
				copy plug-ins/warpos/vectorgraphics.hwp libs:hollywood/ QUIET
			endif
		else
			copy plug-ins/warpos/vectorgraphics.hwp libs:hollywood/ QUIET
		endif
		if exists libs:hollywood/oggtheora.hwp
			version >nil: libs:hollywood/oggtheora.hwp 1
			if warn
				copy plug-ins/warpos/oggtheora.hwp libs:hollywood/ QUIET
			endif
		else
			copy plug-ins/warpos/oggtheora.hwp libs:hollywood/ QUIET
		endif
		if exists libs:hollywood/oggvorbis.hwp
			version >nil: libs:hollywood/oggvorbis.hwp 1
			if warn
				copy plug-ins/warpos/oggvorbis.hwp libs:hollywood/ QUIET
			endif
		else
			copy plug-ins/warpos/oggvorbis.hwp libs:hollywood/ QUIET
		endif
	endif
	if exists libs:hollywood/moviesetter.hwp
		version >nil: libs:hollywood/moviesetter.hwp 1 1
		if warn
			copy plug-ins/warpos/moviesetter.hwp libs:hollywood/ QUIET
		endif
	else
		copy plug-ins/warpos/moviesetter.hwp libs:hollywood/ QUIET
	endif
	if exists libs:hollywood/flicanim.hwp
		version >nil: libs:hollywood/flicanim.hwp 1
		if warn
			copy plug-ins/warpos/flicanim.hwp libs:hollywood/ QUIET
		endif
	else
		copy plug-ins/warpos/flicanim.hwp libs:hollywood/ QUIET
	endif
	if not exists ENVARC:Jack
		makedir ENVARC:Jack
	endif

	delete ENV:jack_destination QUIET

	run >nil: SYS:Utilities/multiview endsplash.png
endif

